<?php
class ORMpz_ecom_product {
  public function toObj($args) {
    $obj = new stdClass();
    if (isset($args->track_id)) {
      $obj->track_id =  $args->track_id;
    }
    if (isset($args->date_added)) {
      $obj->date_added =  $args->date_added;
    }
    if (isset($args->date_last_mod)) {
      $obj->date_last_mod =  $args->date_last_mod;
    }
    if (isset($args->category_id)) {
      $obj->category_id =  $args->category_id;
    }
    if (isset($args->model_id)) {
      $obj->model_id =  $args->model_id;
    }
    if (isset($args->name)) {
      $obj->name =  $args->name;
    }
    if (isset($args->price)) {
      $obj->price =  $args->price;
    }
    if (isset($args->stock)) {
      $obj->stock =  $args->stock;
    }
    if (isset($args->status)) {
      $obj->status =  $args->status;
    }
    if (isset($args->ship_req)) {
      $obj->ship_req =  $args->ship_req;
    }
    if (isset($args->intro_brief)) {
      $obj->intro_brief =  $args->intro_brief;
    }
    if (isset($args->intro_detail)) {
      $obj->intro_detail =  $args->intro_detail;
    }
    if (isset($args->order)) {
      $obj->order =  $args->order;
    }
    return $obj;
  }
}
?>
